#FROM postgres:10
FROM kartoza/postgis:latest
# Alpine
#RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories
#RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
#RUN apk update
#RUN apk upgrade
#RUN apk add postgis@testing gdal@testing geos@testing proj4@testing
#WORKDIR /usr/share/postgresql/extension

# Debian
RUN apt-get -y update
RUN apt-get -y install apt-utils
RUN apt-get -y dist-upgrade
#RUN localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
#ENV LANG ru_RU.utf8
RUN apt-get -y install binutils proj-bin libgeos-dev libgeoip1 libgdal20
#RUN apt-get -y install binutils proj-bin libgeos-dev libgeoip1 gdal-bin postgresql-10-postgis-2.4 postgresql-10-postgis-2.4-scripts
#RUN apt-get -y install libproj12 libgeos-3.5.1 libgdal20 postgresql-10-postgis-2.4
#RUN su postgres pg_ctl start -w -D ${PGDATA}
#RUN sudo -u postgres createdb postgis_template -E UTF8
#RUN sudo -u postgres psql -d postgis_template -c "create extension if not exists postgis;"
#RUN sudo -u postgres pg_ctl stop -w